﻿Type=Activity
Version=6
ModulesStructureVersion=1
B4A=true
@EndOfDesignText@
#Region  Activity Attributes 
	#FullScreen: False
	#IncludeTitle: True
#End Region

Sub Process_Globals
	'These global variables will be declared once when the application starts.
	'These variables can be accessed from all modules.

End Sub

Sub Globals
	'These global variables will be redeclared each time the activity is created.
	'These variables can only be accessed from this module.

	Private clv As clsCustomListView
	Private lbltitle As Label
	Private pyqteachername As Label
	Private pyqteach As Label
	Private pyqcontent As Label
	Private pyqteacherheader As ImageView
	Private btnleft As Label
End Sub

Sub Activity_Create(FirstTime As Boolean)
Dim telaw As telanywhere
telaw.Initialize(Activity)

	'Do not forget to load the layout file created with the visual designer. For example:
	Activity.LoadLayout("layheaderwithclv")
	initviews
End Sub
Private Sub initviews
	lbltitle.Text="张老师的动态"
	Dim nhPYQ As Int=100dip
	Dim nw As Int=100%x
	comm.setFA(btnleft,"fa-angle-left","")
	Dim ts As String=$"老师:今天张同学学习很认真
张*:谢谢老师"$
	For i=0 To 5
		clv.Add(CreateItemPYQ("张老师","初中 英语",ts,nw,nhPYQ),nhPYQ,0)	
	Next
	
End Sub
Private Sub CreateItemPYQ(name As String,teach As String,dtStr As String,w As Int,h As Int) As Panel
	Dim p As Panel
	p.Initialize("")
	Activity.AddView(p,0,0,w,h)
	p.LoadLayout("itempyq")
	p.RemoveView
	pyqteacherheader.Bitmap=LoadBitmapSample(File.DirAssets,"teacher.png",50,50)
	pyqteach.Text=teach
	pyqteachername.Text=name
	pyqcontent.Text=dtStr
	Return p
End Sub
Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub


Sub clv_ItemClick (Index As Int, Value As Object)
	
End Sub

Sub ivback_Click
	Activity.Finish
End Sub